﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class admin_adminmain : System.Web.UI.MasterPage
{
    protected MODEL.Users user = new MODEL.Users();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Session["currentAdmin"] == null)
            {
                Response.Redirect("adminLogin.aspx");
            }
            else
            {
                user = (MODEL.Users)Session["currentAdmin"];
            }
        }
    }
    #region 退出
    /// <summary>
    /// 退出
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void lbtnLoginOut_Click(object sender, EventArgs e)
    {
        Session["currentAdmin"] = null;
        Response.Redirect(Request.UrlReferrer.ToString());
    } 
    #endregion
}
